﻿using MySeventhCSharp.Modes;
using System.Dynamic;

namespace MySeventhCSharp
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.Write("请输入预测的年份：");
            int input = int.Parse(Console.ReadLine());

            //调用Method中的数据
            Method getab = new Method();//创建Method中的对象
            double ayear = getab.getayear();
            double aGDP = getab.getaGDP();
            double b = getab.getb(ayear,aGDP);
            double a = getab.geta(ayear,aGDP,b);
            double result = b * input+ a;
            Console.WriteLine($"{input}年预测的结果是{result}");
            Console.WriteLine(a);
           
        }
    }
}